package com.mstore.service;

import java.util.ArrayList;
import java.util.List;

import com.mstore.dao.AuthorityDao;
import com.mstore.pojo.BAuthority;

public class AuthorityService {
	
	private AuthorityDao authorityDao;

	public List<BAuthority> haveAllAuthority(BAuthority authority) {
		List<BAuthority> authorities = new ArrayList<BAuthority>();
		List<Object> objects = authorityDao.haveAllAuthority(authority);
		for (Object object : objects) {
			authorities.add((BAuthority)object);
		}
		return authorities;
	}

	public AuthorityDao getAuthorityDao() {
		return authorityDao;
	}

	public void setAuthorityDao(AuthorityDao authorityDao) {
		this.authorityDao = authorityDao;
	}
}
